import 'package:flutter/material.dart';

class CupertinoPopupMenu extends StatelessWidget {
  const CupertinoPopupMenu(
      {super.key,
      this.borderShape,
      required this.onSelected,
      this.offset = const Offset(0.0, 0.0),
      this.icon,
      this.child,
      required this.itemBuilder});

  final ShapeBorder? borderShape;
  final PopupMenuItemSelected? onSelected;
  final Offset offset;
  final Icon? icon; // You can only pass [child] or [icon], not both.
  final Widget? child; // You can only pass [child] or [icon], not both.
  final PopupMenuItemBuilder itemBuilder;

  @override
  Widget build(BuildContext context) {
    return PopupMenuButton(
      shape: borderShape,
      onSelected: onSelected,
      offset: offset,
      icon: icon,
      itemBuilder: itemBuilder,
      child: child,
    );
  }
}
